package com.cskaoyan.javase._2inner._2static._2extend;
/**
 * 之前大家定义过内部类
 *
 * @since 17:12
 * @author wuguidong@cskaoyan.onaliyun.com
 */
// 外围类
public class Demo {
    public static void main(String[] args) {
        // 'com.cskaoyan.javase._2inner._2static._2extend.detail.this' cannot be referenced from a static context
        /*
            以下代码是在外围类的静态方法中创建成员内部类对象,这里
            需要先创建外围类Demo的对象
            然后才能创建成员内部类对象
          */
        // Student s = new Student(18, "张三");
        A a = new A();
    }
    // 成员内部类
    class Student{
        int age;
        String name;
        public Student(int age, String name) {
            this.age = age;
            this.name = name;
        }
    }
    static class A{}
}
